package app.netant.book.fyxsw;

import cn.lily.com.enviroment.Enviroment;
import app.netant.book.base.BaseDetail;
import app.netant.book.base.BaseEntity;
import app.netant.book.base.BasePage;
import app.netant.book.base.BaseRoot;

public class FyxswRoot extends BaseRoot {
	
	public FyxswRoot(){
		this.homeUrl = "http://www.fyxsw.cc/wuxia/";
		this.pageUrl = "http://www.fyxsw.cc/wuxia/";
		this.tableKey = "fyxsw";
	}

	@Override
	public String buildUrl(int pageIdx) {
		
		if(pageIdx==1){
			return "http://www.fyxsw.cc/xuanhuan/";
		}
		
		else if(pageIdx==2){
			return "http://www.fyxsw.cc/xianxia/";
		}
		
		else if(pageIdx==3){
			return "http://www.fyxsw.cc/yanqing/";
		}
		
		else if(pageIdx==4){
			return "http://www.fyxsw.cc/chuanyue/";
		}
		
		else if(pageIdx==5){
			return "http://www.fyxsw.cc/kehuan/";
		}
		
		else if(pageIdx==6){
			return "http://www.fyxsw.cc/wuxia/";
		}
		
		else if(pageIdx==7){
			return "http://www.fyxsw.cc/junshi/";
		}
		
		else if(pageIdx==8){
			return "http://www.fyxsw.cc/kongbu/";
		}
		
		else if(pageIdx==9){
			return "http://www.fyxsw.cc/tongrenxiaoshuo/";
		}
		
		return this.pageUrl;
	}

	@Override
	public BasePage buildPage(String url) {
		return new FyxswPage(url);
	}

	@Override
	public BaseDetail buildDetail(String url) {
		return new FyxswDetail(url);
	}

	@Override
	public BaseEntity buildEntity() {
		return new FyxswEntity();
	}
	
	@Override
	public void afterEntity(BaseEntity entity) {
		
	}
	
	public static void main(String[] args) {
		
		Enviroment.createEnv();
		Enviroment.getEnv().getLogBean().beginLog();
		
		FyxswRoot root = new FyxswRoot();
		//root.analyse(9);
		root.excepCycle();
	}


	
}
